using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Han.Forms
{
    public partial class frmDukkanGiris : DevExpress.XtraEditors.XtraForm, Util.iAddNew, Util.iSaveChange
    {

        
        public frmDukkanGiris()
        {
            InitializeComponent();
            this.Load += new EventHandler(frmDukkanGiris_Load);
        }

        void frmDukkanGiris_Load(object sender, EventArgs e)
        {
            bndDukkan.DataSource = db.Dukkans; 
        }

        DBDataContext db = new DBDataContext(); 

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            bndDukkan.EndEdit();
            db.SubmitChanges(); 
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
           
        }

        #region iAddNew Members

        public void AddNew()
        {
            bndDukkan.AddNew(); 
        }

        #endregion

        #region iSaveChange Members

        public void SaveChange()
        {
            db.SubmitChanges(); 
        }

        #endregion
    }
}